import {percent} from './percent';
import toastr from 'toastr';
import axios from 'axios';
//获取按钮
let btn = document.querySelector('button');

// btn.onclick = function(){
//   //根据 30% 概率的结果弹出内容
//   if(percent(30)){
//     toastr.success('中奖啦~');
//   }else{
//     toastr.warning('再接再厉~~下次继续');
//   }
// }

btn.onclick = async function(){
  toastr.info('Are you the 6 fingered man?');
  let res = await axios.get('http://api.xiaohigh.com/duanzi')
  console.log(res);
} 